Skip to content

Refactor backup configuration paths to be configurable; remove ~/work/#1

Merged
sigridjineth merged 4 commits into
ultraworkers:mainfrom
thedavidweng:main
Jun 7, 2026
Merged

Refactor backup configuration paths to be configurable; remove ~/work/#1
sigridjineth merged 4 commits into
ultraworkers:mainfrom
thedavidweng:main

Conversation

@thedavidweng

Copy link
Copy Markdown
Contributor

This pull request enhances the backup tool's flexibility by allowing users to specify extra directories to include or exclude in every backup via configuration. It removes hardcoded workspace paths, making the tool more adaptable to different setups. The documentation is updated to reflect these changes, and the backup logic is refactored to support the new configuration options.

Configuration and User Customization:

  • Added support for [paths] in the config file, allowing users to specify extra directories to include and exclude directories to skip in every backup. Paths support ~ expansion. (README.md [1] [2]; src/main.rs [3] [4]
  • Updated the backup logic to use these extra include/exclude paths throughout the backup and auto modes. (src/main.rs [1] [2]; src/backup.rs [3] [4]

Backup Path Discovery Refactor:

  • Removed hardcoded inclusion of ~/work/hermes-agent and ~/work/openclaw from the default backup set; these can now be added via the config if needed. (src/paths.rs src/paths.rsL49-L68)
  • Refactored the file discovery logic to:
    • Add user-configured extra paths as full scans.
    • Exclude any files or directories under configured exclude paths, both at the root and per-file level. (src/paths.rs src/paths.rsL27-R61)
    • Added a helper function to check if a path is under an excluded base. (src/paths.rs src/paths.rsR238-R242)

Documentation Updates:

  • Updated the README.md to document the new [paths] configuration, removed references to automatic workspace discovery, and clarified what is backed up by default. (README.md [1] [2] [3]

These changes make the backup tool more user-configurable and less dependent on hardcoded paths, improving its usability across different environments.

Copilot AI and others added 4 commits April 27, 2026 06:03
…clude paths via config

Agent-Logs-Url: https://github.com/thedavidweng/hbackup/sessions/f1204332-755c-4dcc-959f-a99541243758

Co-authored-by: thedavidweng <95214375+thedavidweng@users.noreply.github.com>
…g-paths

Fix default backup paths: remove ~/work/openclaw, restore ~/.openclaw/workspace* discovery
@sigridjineth sigridjineth merged commit 0a78dd6 into ultraworkers:main Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants